<?php 
class manager_marketing_model extends CI_model{

	function list_manager_marketing(){
		$this->db->select('*');
		$this->db->from('manager_marketing');
		$this->db->order_by('manager_marketing.id_manager_marketing', 'DESC');
		$q = $this->db->get();
		return $q->result();
	}

	function show_kontak_manager_marketing(){
		$q = $this->db->query("SELECT k.id_kontak, k.kategori_kontak, k.tipe_kontak, k.kontak, k.id_global
							   FROM
							   kontak k
							   JOIN
							   manager_marketing mm ON k.id_global=mm.id_manager_marketing
							   WHERE kategori_kontak='manager_marketing'");
		return $q->result();
	}
	
}

?>